<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>demo1</title>
</head>
<body>

    <table>

        <tr>
            <th>编号</th>
            <th>姓名</th>
            <th>年龄</th>
            <th>index</th>
        </tr>

        <tr th:each="user,iterStat:${userList}">
            <td th:text="${user.id}"></td>
            <td th:text="${user.name}"></td>
            <td th:text="${user.age}"></td>
            <td th:text="${iterStat.index}"></td>

        </tr>


    </table>

</body>
</html>
